home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 5 / Skunkware 5.iso / man / cat.n / file.n < prev    next >
Text File  |  1995-07-25  |  9KB  |  199 lines

  1.  
  2.  
  3.  
  4.      ffffiiiilllleeee((((nnnn))))                      TTTTccccllll (((( ))))                      ffffiiiilllleeee((((nnnn))))
  5.  
  6.  
  7.  
  8.      _________________________________________________________________
  9.  
  10.      NNNNAAAAMMMMEEEE
  11.           file - Manipulate file names and attributes
  12.  
  13.      SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  14.           ffffiiiilllleeee _o_p_t_i_o_n _n_a_m_e ?_a_r_g _a_r_g ...?
  15.      _________________________________________________________________
  16.  
  17.  
  18.      DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  19.           This command provides several operations on a file's name or
  20.           attributes.  _N_a_m_e is the name of a file; if it starts with a
  21.           tilde, then tilde substitution is done before executing  the
  22.           command   (see  the  manual  entry  for  TTTTccccllll____TTTTiiiillllddddeeeeSSSSuuuubbbbsssstttt  for
  23.           details).  _O_p_t_i_o_n indicates what to do with the  file  name.
  24.           Any unique abbreviation for _o_p_t_i_o_n is acceptable.  The valid
  25.           options are:
  26.  
  27.           ffffiiiilllleeee aaaattttiiiimmmmeeee _n_a_m_e
  28.                Returns a decimal string giving the time at which  file
  29.                _n_a_m_e  was  last  accessed.  The time is measured in the
  30.                standard POSIX fashion as seconds from a fixed starting
  31.                time  (often  January  1,  1970).   If the file doesn't
  32.                exist or its access time  cannot  be  queried  then  an
  33.                error is generated.
  34.  
  35.           ffffiiiilllleeee ddddiiiirrrrnnnnaaaammmmeeee _n_a_m_e
  36.                Returns all of the characters in _n_a_m_e  up  to  but  not
  37.                including  the  last  slash character.  If there are no
  38.                slashes in _n_a_m_e then returns ``.''.  If the last  slash
  39.                in _n_a_m_e is its first character, then return ``/''.
  40.  
  41.           ffffiiiilllleeee eeeexxxxeeeeccccuuuuttttaaaabbbblllleeee _n_a_m_e
  42.                Returns 1111 if file _n_a_m_e is  executable  by  the  current
  43.                user, 0000 otherwise.
  44.  
  45.           ffffiiiilllleeee eeeexxxxiiiissssttttssss _n_a_m_e
  46.                Returns 1111 if file _n_a_m_e exists and the current user  has
  47.                search  privileges for the directories leading to it, 0000
  48.                otherwise.
  49.  
  50.           ffffiiiilllleeee eeeexxxxtttteeeennnnssssiiiioooonnnn _n_a_m_e
  51.                Returns  all  of  the  characters  in  _n_a_m_e  after  and
  52.                including  the last dot in _n_a_m_e.  If there is no dot in
  53.                _n_a_m_e then returns the empty string.
  54.  
  55.           ffffiiiilllleeee iiiissssddddiiiirrrreeeeccccttttoooorrrryyyy _n_a_m_e
  56.                Returns 1111 if file _n_a_m_e is a directory, 0000 otherwise.
  57.  
  58.           ffffiiiilllleeee iiiissssffffiiiilllleeee _n_a_m_e
  59.                Returns 1111 if file _n_a_m_e is a regular file, 0000 otherwise.
  60.  
  61.  
  62.  
  63.      Page 1                                          (printed 7/17/95)
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.      ffffiiiilllleeee((((nnnn))))                      TTTTccccllll (((( ))))                      ffffiiiilllleeee((((nnnn))))
  71.  
  72.  
  73.  
  74.           ffffiiiilllleeee llllssssttttaaaatttt _n_a_m_e _v_a_r_N_a_m_e
  75.                Same as ssssttttaaaatttt option (see below) except uses  the  _l_s_t_a_t
  76.                kernel  call  instead of _s_t_a_t.  This means that if _n_a_m_e
  77.                refers to a symbolic link the information  returned  in
  78.                _v_a_r_N_a_m_e  is for the link rather than the file it refers
  79.                to.  On systems that don't support symbolic links  this
  80.                option behaves exactly the same as the ssssttttaaaatttt option.
  81.  
  82.           ffffiiiilllleeee mmmmttttiiiimmmmeeee _n_a_m_e
  83.                Returns a decimal string giving the time at which  file
  84.                _n_a_m_e  was  last  modified.  The time is measured in the
  85.                standard POSIX fashion as seconds from a fixed starting
  86.                time  (often  January  1,  1970).   If the file doesn't
  87.                exist or its modified time cannot be  queried  then  an
  88.                error is generated.
  89.  
  90.           ffffiiiilllleeee oooowwwwnnnneeeedddd _n_a_m_e
  91.                Returns 1111 if file _n_a_m_e is owned by the current user,  0000
  92.                otherwise.
  93.  
  94.           ffffiiiilllleeee rrrreeeeaaaaddddaaaabbbblllleeee _n_a_m_e
  95.                Returns 1111 if file _n_a_m_e is readable by the current user,
  96.                0000 otherwise.
  97.  
  98.           ffffiiiilllleeee rrrreeeeaaaaddddlllliiiinnnnkkkk _n_a_m_e
  99.                Returns the value of the symbolic link  given  by  _n_a_m_e
  100.                (i.e.  the  name  of  the  file it points to).  If _n_a_m_e
  101.                isn't a symbolic link or its value cannot be read, then
  102.                an  error  is  returned.  On systems that don't support
  103.                symbolic links this option is undefined.
  104.  
  105.           ffffiiiilllleeee rrrroooooooottttnnnnaaaammmmeeee _n_a_m_e
  106.                Returns all of the characters in _n_a_m_e  up  to  but  not
  107.                including  the  last  ``.''  character in the name.  If
  108.                _n_a_m_e doesn't contain a dot, then returns _n_a_m_e.
  109.  
  110.           ffffiiiilllleeee ssssiiiizzzzeeee _n_a_m_e
  111.                Returns a decimal string giving the size of  file  _n_a_m_e
  112.                in bytes.  If the file doesn't exist or its size cannot
  113.                be queried then an error is generated.
  114.  
  115.           ffffiiiilllleeee ssssttttaaaatttt  _n_a_m_e _v_a_r_N_a_m_e
  116.                Invokes the ssssttttaaaatttt kernel call  on  _n_a_m_e,  and  uses  the
  117.                variable  given by _v_a_r_N_a_m_e to hold information returned
  118.                from the kernel call.  _V_a_r_N_a_m_e is treated as  an  array
  119.                variable,  and  the following elements of that variable
  120.                are set: aaaattttiiiimmmmeeee, ccccttttiiiimmmmeeee,  ddddeeeevvvv,  ggggiiiidddd,  iiiinnnnoooo,  mmmmooooddddeeee,  mmmmttttiiiimmmmeeee,
  121.                nnnnlllliiiinnnnkkkk,  ssssiiiizzzzeeee, ttttyyyyppppeeee, uuuuiiiidddd.  Each element except ttttyyyyppppeeee is a
  122.                decimal string with  the  value  of  the  corresponding
  123.                field  from  the  ssssttttaaaatttt return structure; see the manual
  124.                entry for ssssttttaaaatttt for  details  on  the  meanings  of  the
  125.                values.  The ttttyyyyppppeeee element gives the type of the file in
  126.  
  127.  
  128.  
  129.      Page 2                                          (printed 7/17/95)
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.      ffffiiiilllleeee((((nnnn))))                      TTTTccccllll (((( ))))                      ffffiiiilllleeee((((nnnn))))
  137.  
  138.  
  139.  
  140.                the same form returned by the command ffffiiiilllleeee ttttyyyyppppeeee.   This
  141.                command returns an empty string.
  142.  
  143.           ffffiiiilllleeee ttttaaaaiiiillll _n_a_m_e
  144.                Returns all of the characters in _n_a_m_e  after  the  last
  145.                slash.  If _n_a_m_e contains no slashes then returns _n_a_m_e.
  146.  
  147.           ffffiiiilllleeee ttttyyyyppppeeee _n_a_m_e
  148.                Returns a string giving the type of  file  _n_a_m_e,  which
  149.                will  be  one  of  ffffiiiilllleeee,  ddddiiiirrrreeeeccccttttoooorrrryyyy,  cccchhhhaaaarrrraaaacccctttteeeerrrrSSSSppppeeeecccciiiiaaaallll,
  150.                bbbblllloooocccckkkkSSSSppppeeeecccciiiiaaaallll, ffffiiiiffffoooo, lllliiiinnnnkkkk, or ssssoooocccckkkkeeeetttt.
  151.  
  152.           ffffiiiilllleeee wwwwrrrriiiittttaaaabbbblllleeee _n_a_m_e
  153.                Returns 1111 if file _n_a_m_e is writable by the current user,
  154.                0000 otherwise.
  155.  
  156.  
  157.      KKKKEEEEYYYYWWWWOOOORRRRDDDDSSSS
  158.           attributes, directory, file, name, stat
  159.  
  160.  
  161.  
  162.  
  163.  
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.      Page 3                                          (printed 7/17/95)
  196.  
  197.  
  198.  
  199.